// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	2/22/2015 12:39:01 PM				
// -----------------------------

#ifndef _ShaderLoader_h
#define _ShaderLoader_h

#include "Job.h"

#include "zlib.h"
#include "png.h"

namespace Flow
{

	class IGraphicsDevice;
	class IMutex;
	class IShader;

	class File;

	class ShaderLoader : public Job
	{
	public:

		ShaderLoader(IGraphicsDevice* lpDevice, IMutex* lpGraphicsMutex, const tstring& file, ShaderType::Enum shaderType);
		virtual ~ShaderLoader();

		IShader*		Load();
		virtual void	Run();

	private:

		static IMutex*		s_LibPNGLock;

		IGraphicsDevice*	m_lpGraphicsDevice;
		IMutex*				m_lpGraphicsMutex;

		IShader*			m_lpShader;
		tstring				m_FilePath;
		ShaderType::Enum	m_ShaderType;
		File*				m_lpFile;

		ShaderLoader(const ShaderLoader& refShaderLoader);
		ShaderLoader& operator=(const ShaderLoader& refShaderLoader);

	};

}

#endif